<template>
  <div>
    <el-table :data="instockData" size="mini" style="width: 730px">
      <el-table-column property="subWaybillNo" label="子单号">
      </el-table-column>
      <el-table-column property="boxNo" label="箱号" width="160px">
      </el-table-column>
      <el-table-column property="length" label="长"  width="60px">
      </el-table-column>
      <el-table-column property="width" label="宽" width="60px">
      </el-table-column>
      <el-table-column property="height" label="高" width="60px">
      </el-table-column>
      <el-table-column property="weight" label="实重"  width="60px">
      </el-table-column>
      <el-table-column property="totalVolum" label="体积" >
      </el-table-column>
      <el-table-column property="volumeWeight" label="体积重" >
      </el-table-column>
      <el-table-column property="chargeWeight" label="计费重">
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
  import { ajax } from "@/store/yg/common/utils";
  import axios from "axios";
  import * as constant from "@/store/yg/common/constant";

export default {
  props: ['data'],
  data() {
    return {
      instockData: [],
    }
  },
  mounted() {
    this.initInstockData();
  },
  methods: {
    initInstockData: function () {
      console.log(this.data)
      if (this.data["id"]) {
        var waybillId = this.data["id"];
        ajax("initSubwaybillList", {"waybillId": waybillId}).then(
          res => {
            if (res.code == 200) {
              this.instockData = res.data;
            }
          },
          error => {
            console.log(error);
          }
        );
      }
    }
  }

}
</script>
